#include "std_mutex.h"


int std_mutex() {
    //! 1. 普通互斥锁
    std::thread t1(func);
    std::thread t2(func);
    std::thread t3(func);
    t1.join();
    t2.join();
    t3.join();


    //! 3. 带超时的互斥锁
    std::thread t4(work);
    std::thread t5(work);
    t4.join();
    t5.join();

    return 0;
}